<!DOCTYPE html>

<html>



<head>

	<meta charset="utf-8">

	<title></title>

	<meta name="renderer" content="webkit">

	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

	<meta name="viewport"
		content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">

	<link rel="stylesheet" href="/public/static/layuiadmin/layui/css/layui.css" media="all">

	<link rel="stylesheet" href="/public/static/layuiadmin/style/admin.css" media="all">

	<style>
		.layui-form-label {
			width: 160px !important;
		}

		.layui-input-block {
			margin-left: 190px;
		}
	</style>

</head>



<body>

	<div class="layui-fluid">

		<div class="layui-card">

			<div class="layui-card-body" style="padding: 15px;">

				<form class="layui-form" method="post" lay-filter="component-form-group" id="moduleForm">

					<div class="layui-form-item">

						<label class="layui-form-label">役割</label>

						<div class="layui-input-block">

							<select name="role_id" lay-verify="required" lay-filter="role_id">

								{volist name="role" id="v"}

								<option value="{$v.id}">{$v.title}</option>

								{/volist}

							</select>

						</div>

					</div>

					<div class="layui-form-item">

						<label class="layui-form-label">タイトル</label>

						<div class="layui-input-block">

							<input type="text" name="name" lay-verify="required" placeholder="タイトル"
								autocomplete="off" class="layui-input">

						</div>

					</div>

					<div class="layui-form-item">

						<label class="layui-form-label">ログイン/ユーザー名</label>

						<div class="layui-input-block">

							<input type="text" name="username" lay-verify="required" placeholder="ログイン/ユーザー名を入力してください"
								autocomplete="off" class="layui-input">

						</div>

					</div>

					<div class="layui-form-item">

						<label class="layui-form-label">ログインパスワード</label>

						<div class="layui-input-block">

							<input type="text" name="password" value="123456a" lay-verify="required"
								placeholder="ログインパスワードを入力してください" autocomplete="off" class="layui-input">

						</div>

					</div>

					<div class="layui-form-item">

						<label class="layui-form-label">連絡先番号</label>

						<div class="layui-input-block">

							<input type="text" name="phone" placeholder="連絡先番号を入力してください" autocomplete="off"
								class="layui-input">

						</div>

					</div>

					<div class="layui-form-item">

						<label class="layui-form-label">郵便</label>

						<div class="layui-input-block">

							<input type="text" name="email" value="" placeholder="連絡先メールアドレスを入力してください"
								autocomplete="off" class="layui-input">

						</div>

					</div>

					<!-- <div class="layui-form-item">

							<label class="layui-form-label">联系地址</label>

							<div class="layui-input-block">

								<input type="text" name="address" placeholder="请输入联系地址" autocomplete="off"

								 class="layui-input">

							</div>

						</div> -->

					<div class="layui-form-item">

						<label class="layui-form-label">ステ一夕ス</label>

						<div class="layui-input-block">

							<input type="radio" name="status" value="1" title="普通" checked>

							<input type="radio" name="status" value="2" title="非アクティブ化する">

						</div>

					</div>

					<div class="layui-form-item layui-layout-admin">

						<div class="layui-input-block">

							<div class="layui-footer" style="left: 0;">

								<button class="layui-btn" lay-submit="" lay-filter="component-form-demo1">保存</button>

							</div>

						</div>

					</div>

				</form>

			</div>

		</div>

	</div>

	<script src="/public/static/layuiadmin/layui/layui.js"></script>

	<script>

		layui.config({

			base: '/public/static/layuiadmin/' // 静态资源所在路径

		}).extend({

			index: 'lib/index', // 主入口模块

			api: 'api'

		}).use(['index', 'form', 'laydate', 'api'], function () {

			var $ = layui.$,

				admin = layui.admin,

				element = layui.element,

				layer = layui.layer,

				laydate = layui.laydate,

				api = layui.api,

				form = layui.form;



			form.render(null, 'component-form-group');



			/* 监听提交 */

			form.on('submit(component-form-demo1)', function (data) {

				var dats = data.field;

				var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引

				layer.msg('加载中', {

					icon: 16,

					shade: 0.01

				});

				api.ajax('{:url("User/save")}', 'post', 'json', dats, function (res) {

					layer.closeAll('loading');

					layer.msg(res.msg);

					$("#moduleForm")[0].reset();

					parent.tables.reloads();

				});

				return false;

			});

		});

	</script>

</body>



</html>